#if !TARGET_LPC11XX

#include "sm2.h"

#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <fcntl.h>
#include <stdlib.h>

extern void EccPoint_mult(EccPoint *p_result, EccPoint *p_point, uint8_t *p_scalar);

void vli_print(uint8_t *p_vli)
{
	unsigned i;
	for (i = 0; i<NUM_ECC_DIGITS - 1; ++i)
	{
		printf("0x%02X, ", (unsigned)p_vli[i]);
	}
	printf("0x%02X", (unsigned)p_vli[i]);
}

int randfd;

void getRandomBytes(void *p_dest, unsigned p_size)
{
	if (read(randfd, p_dest, p_size) != (int)p_size)
	{
		printf("Failed to get random bytes.\n");
	}
}



#endif /* !TARGET_LPC11XX */
